﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Saker.Kernel.DAL;
using Saker.Kernel.Model;

namespace Saker.Kernel.BLL
{
    #region SysRole业务逻辑层
	/// <summary>
	///SysRole业务逻辑层
	/// </summary>
    public partial class SysRoleBLL
    {
         #region SysEvent业务逻辑层 自动生成
        /// <summary>
        /// 添加SysRole
        /// </summary>
        /// <param name="SysRole">SysRole实体</param>
        /// <returns>添加后的SysRole实体</returns>
        public SysRole Add(SysRole sysRole)
        {
            return new SysRoleDAL().Add(sysRole);
        }
        /// <summary>
        /// 根据主键删除SysRole
        /// </summary>
        /// <param name="RoleID">RoleID主键</param>
        /// <returns>影响的行数</returns>
        public int DeleteByRoleID(int roleID)
        {
            return new SysRoleDAL().DeleteByRoleID(roleID);
        }
        /// <summary>
        /// 根据主键更新
        /// </summary>
        /// <param name="SysRole">SysRole实体</param>
        /// <returns>影响的行数</returns>
		public int Update(SysRole sysRole)
        {
            return new SysRoleDAL().Update(sysRole);
        }
        
        /// <summary>
        /// 根据主键得到实体
        /// </summary>
        /// <param name="RoleID">RoleID主键</param>
        /// <returns>SysRole实体</returns>
        public SysRole GetByRoleID(int roleID)
        {
            return new SysRoleDAL().GetByRoleID(roleID);
        }
        /// <summary>
        /// 得到总行数
        /// </summary>
        /// <returns>总行数</returns>
		public int GetTotalCount()
		{
			return new SysRoleDAL().GetTotalCount();
		}
		/// <summary>
		/// 分页，仅sql 2005及以上版本使用
		/// </summary>
		/// <param name="minrownum">开始行数</param>
		/// <param name="maxrownum">结束行数</param>
		/// <returns>SysRole实体集合</returns>
		public IEnumerable<SysRole> GetPagedData(int minrownum,int maxrownum)
		{
			return new SysRoleDAL().GetPagedData(minrownum,maxrownum);
		}
        /// <summary>
        /// 分页，调用存储过程
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="recordCount">记录数</param>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="pageCount">总页数</param>
        /// <param name="whereCondition">where</param>
        /// <returns>DataTable数据集</returns>
        public DataTable GetPagingRecord(int pageIndex, ref int recordCount, int pageSize, ref int pageCount,string whereCondition)
        {
            return new SysRoleDAL().GetPagingRecord(pageIndex, ref recordCount,pageSize,ref pageCount,whereCondition);
        }
		/// <summary>
		/// 得到所有SysRole实体集合
		/// </summary>
		/// <returns>SysRole实体集合</returns>
		public IEnumerable<SysRole> GetAll()
		{
			return new SysRoleDAL().GetAll();
		}
        #endregion
    }
    #endregion
}
